<?php
class Manuals extends Public_Controller
{
	function __construct()
	{
		parent::__construct();
	}
	
	function index(){
        $data['manuals'] = new Manual();
        $data['manuals']->where("status = 'approve'")->order_by("orderlist","asc")->get_page(10);
        $this->template->build('index',$data);
    }
    
    function view($id){
        $data['manual'] = new Manual($id);
		$data['attachs'] = new Attach();
        $data['attachs']->where("module = 'manuals' and content_id = ".$id)->order_by('id','asc')->get();
        $this->template->build('view',$data);
    }
}
?>